import 'package:get/get.dart';
import 'package:signage/l10n/l10n.dart';

class MemberInfoItem {
  String? keyName;
  String? value;
  // a面还是b面
  String? type;

  MemberInfoItem({this.keyName, this.value, this.type = "A"});

  MemberInfoItem.fromJson(Map<String, dynamic> json) {
    keyName = json['keyName'];
    value = json['value'];
    type = json['type'];
  }

  Map<String, dynamic> toJson() {
    final data = <String, dynamic>{};
    data['keyName'] = keyName;
    data['value'] = value;
    data['type'] = type;
    return data;
  }

  String get localizedKeyName {
    return AppLocalizations(Get.locale!).translate(keyName ?? '');
  }
}


